<%@ Page Language="C#" MasterPageFile="~/MasterPages/manager/dialog.master" AutoEventWireup="true" CodeFile="SelectImage.aspx.cs" Inherits="manager_dialogs_SelectImage" Title="Untitled Page" %>
<%@ OutputCache Duration="5" VaryByParam="*" %>
<%@ Register Assembly="WebControls" Namespace="WebControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <link href="../../manager/dialogs/SelectImage.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../scripts/prototype.js"></script>
    <script type="text/javascript" src="selectimage.js"></script>
    <script type="text/javascript">
    <!--
    _rootUrl='<%=mWebsite.ImagesFolder %>';
    _webfolder = '<%=mWebsite.SubFolderName %>';
    // -->
    </script>
    <h2>Select an Image</h2>
    <a name="preview" />
    <div id="preview" style="display:none;">
        <fieldset title="Preview Image">
            <legend>Preview Image</legend>
        <div id="previewImage" align="center"></div>
        <div id="imageInfo" align="center"></div>
        <div align="center"><br /><button id="btnUseImage">Use This Image</button></div>
        </fieldset>
    </div>
    <form id="formUpload" target="iframeUpload">
        <input type="hidden" name="currentFolderField" value="" />
            <fieldset title="Uploaded">
                <legend>Upload a file</legend>
                <div>
                    <asp:HiddenField runat="server" ID="uploadFolder" />
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                    <script type="text/javascript">
                        ctrlFileUpload = $('<%=FileUpload1.ClientID %>');
                        ctrlUploadFolder = $('<%=uploadFolder.ClientID %>');
                    </script>
                    <cc1:UploadButton ID="UploadButton1" runat="server" RelatedFileUploadControlId="FileUpload1" OnUploadClick="UploadButton1_UploadClick" Text="Upload" OnStartScript="startCallback" OnCompleteScript="completeCallback" />
                </div>
                <div id="processDiv" style="display:none; color: #660066; font-family: Arial;">
                    <img src="/swa/i/progress.gif" />
                    Uploading file '<span id="fileName" runat="server" />' 
                </div>
            </fieldset>
        </form>


<fieldset title="Browse for images">
<div id="navigation">
Current Folder: <div id="currentfolder" style="display:inline;"></div>&nbsp;<a id="parent" href="javascript:void(0);" onclick="folderUp();">Up One Folder...</a><br />
<div id="imagesLoading" style="display:none;"><i>Loading...</i></div>
</div>
<div id="images">

</div>
</fieldset>
</asp:Content>

